// import com.alibaba.druid.DbType;
// import com.alibaba.druid.sql.ast.SQLObject;
// import com.alibaba.druid.sql.ast.SQLStatementImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

// import java.util.Collections;
// import java.util.List;

#include "SQLShowStatisticListStmt.h"
#include "../../visitor/SQLASTVisitor.h"
#include "SQLExprTableSource.h"

SQLShowStatisticListStmt::SQLShowStatisticListStmt()
    : SQLStatementImpl(DbType_ptr(new DbType(&DbType::odps)))
{
}

SQLExprTableSource_ptr SQLShowStatisticListStmt::getTableSource()
{
  return tableSource;
}

void SQLShowStatisticListStmt::setTableSource(SQLExprTableSource_ptr tableSource)
{
  this->tableSource = tableSource;
}

// @Override
void SQLShowStatisticListStmt::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLShowStatisticListStmt)))
  {
    acceptChild(visitor, tableSource);
  }
  visitor->endVisit(SharedObject(SQLShowStatisticListStmt));
}

// @Override
SQLObject_list_ptr SQLShowStatisticListStmt::getChildren()
{
  SQLObject_list_ptr tmp = std::make_shared<std::list<SQLObject_ptr>>();
  tmp->push_back(this->tableSource);
  return tmp;
}

BOOL_ptr SQLShowStatisticListStmt::isFull()
{
  return full;
}

void SQLShowStatisticListStmt::setFull(BOOL_ptr full)
{
  this->full = full;
}
